package cn.stimd.spring.aop.framework.adapter;

import cn.stimd.spring.aop.Advisor;
import org.aopalliance.intercept.MethodInterceptor;

/**
 * Created by Stimd
 * 项目地址：https://gitee.com/stimd/spring-wheel
 * 公众号：Java编程探微
 */
public interface AdvisorAdapterRegistry {
    /**
     * 对Advice进行包装，并返回一个Advisor。至少应提供以下支持：
     * MethodInterceptor
     * MethodBeforeAdvice
     * AfterReturningAdvice
     * ThrowsAdvice
     */
    Advisor wrap(Object advice);


    MethodInterceptor[] getInterceptors(Advisor advisor);


    void registerAdvisorAdapter(AdvisorAdapter adapter);
}
